import rclpy
from rclpy.node import Node
from std_msgs.msg import String

class Listener(Node):
    def __init__(self):
        super().__init__("listen")
        self.subscription_ = self.create_subscription(String,
        "aimoe_topic_py",
        self.listener_callback,
        10)
        self.subscription_

    def listener_callback(self,msg):
        self.get_logger().info("recive:%s"%msg.data)

def main(args=None):
    rclpy.init(args=args)

    listener = Listener()

    rclpy.spin(listener)

    rclpy.shutdown()

if __name__ == "__main__":
    main()